import request from '@/utils/request'

// 获取所有的系列
export const getAllCategoryService = () => request.get('/category')

// 获取所有商品
export const getAllGoods = (pageNum, pageSize) => {
  return request.get('/goods', {
    params: {
      pageNum, pageSize
    }
  })
}

// 根据店铺id获取所有的商品信息
export const getGoodsListService = (shop_id) => {
  return request.get(`/shops/search?shop_id=${shop_id}`)
}

// 根据商品id获取商品信息
export const getGoodsInfoService = (goods_id) => {
  return request.get(`/goods/${goods_id}`)
}

// 根据系列id获取商品列表
export const getGoodsByCidService = (categoryId) => request.get(`/goods/search?categoryId=${categoryId}`)
